{extend name="layout/base" /}
{block name="main"}
<article class="main__content content">
    <h4>轮播列表</h4>
    <a href="{:url('edit')}" class="button button--green">新增</a>
    <table class="table">
        <thead class="table__head">
        <tr>
            <th>ID</th>
            <th>标题</th>
            <th>图片</th>
            <th>时间</th>
            <th>权重</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody class="table__body">
        {foreach $swiperList as $swiper}
        <tr>
            <td>{$swiper.id}</td>
            <td>
                <div class="image-title-group">
                    <p><strong>{$swiper.title ?? ''}</strong></p>
                </div>
            </td>
            <td>
                <div class="image-title-group">
                    <img height="80px" src="{$swiper.image ?? ''}" class="error-nopic" />
                </div>
            </td>
            <td>{$swiper.create_time}</td>
            <td>{$swiper.sequence}</td>
            <td>
                <div class="tpl-table-black-operation">
                    <a href="{:url('edit')}?id={$swiper.id ?? ''}">
                        <i class="am-icon-pencil"></i> 编辑
                    </a>
                    <a href="{:url('delete')}?id={$swiper.id ?? ''}" class="tpl-table-black-operation-del">
                        <i class="am-icon-trash"></i> 删除
                    </a>
                </div>
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
</article>
{/block}
